using System;
using System.Threading;

namespace Dida
{
/*	class InterlockedList
	{
		class Node
		{
			public Node prev;
			public Node next;

			public long inList;
		}

		Node head;
		Node tail;

		public void PushBack()
		{
			Node node = new Node();

			while (true)
			{
				// make sure the tail is up to date
				Node curTail;
				while(true)
				{
					curTail = tail;
					Node curNext = curTail.next;
					if(curNext == null)
						break;

					Interlocked.CompareExchange(ref tail,curTail.next,curTail);
				}
				node.prev = tail;
				node.next = null;

				Interlocked.CompareExchange(ref tail,
			}
		}
	}*/
}